package com.foruo.learn.designmode.adaper;

/**
 * 测试
 * @author GaoYuan
 * @date 2018/5/21 下午20:03
 */
public class TestMe {

    public static void main(String[] args){
        //第一种用法
        IDemoNew demoNew = new DemoNewAdapter();
        System.out.println(demoNew.getNew());

        //第二种用法
        demoNew = new DemoNewAdapter2(new DemoOld());
        System.out.println(demoNew.getNew());
    }

}
